<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src=".\js\jquery-3.7.1.min.js"></script>
    <script>
        $(function(){
            // 获取到标签对象
            var $mybtn = $("div"); 
            alert($mybtn);    
            // 样式修改
            $mybtn.css({"height":"100px"});
            // has方法
            $mybtn.has("#btn").css({"background":"red"});
            // eq方法
            $mybtn.eq(1).css({"background":"blue"});
        })
    </script>
</head>
<body>
    <div>
        <input type="button" value="itcast" id="btn">
    </div>
    <div>
        <input type="button" value="heima" class="btn">
    </div>
</body>
</html>